<script>

</script>
<div class="well">
	<table class="table table-bordered" id="selected_itinerary_block">
		<caption><strong>Selected Itinerary</strong></caption>
		<thead>
			<tr>
				<th>Flight</th>
				<th>Departure</th>
				<th>Arrival</th>
				<th>Class/Status</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($selected_itinerary as $k => $v):?>
			<tr <?php if ($k % 2 == 0):?>class="info"<?php endif;?>>
				<td><?php echo $v['scheduler']['flight_code'];?>
				</td>
				<td>
				<?php echo $v['airport']['from']['airport_name'] . (($v['airport']['from']['airport_name'] != $v['airport']['from']['area']['name']) ? ('/' . $v['airport']['from']['area']['name']) : '');?>
				<br />
				<?php echo date('d M (D) H:i', strtotime($v['departure_date'] . ' ' . $v['scheduler']['departure_time']));?>
				</td>
				<td>
				<?php echo $v['airport']['to']['airport_name'] . (($v['airport']['to']['airport_name'] != $v['airport']['to']['area']['name']) ? ('/' . $v['airport']['to']['area']['name']) : '');?>
				<br />
				<?php echo date('d M (D) H:i', strtotime($v['departure_date'] . ' ' . $v['scheduler']['arrival_time']));?>
				</td>
				<td>
				<?php echo ($booking_data['cabin_class'] == 'Y') ? 'Economy' : 'Prestige';?>
				<br />
				<?php echo ($booking_data['adult_count'] + $booking_data['child_count']) . ' Seat';?>
				</td>
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<table class="table table-bordered" id="passenger_fare_information">
		<caption><strong>Passenger and Fare Information</strong></caption>
		<thead>
			<tr>
				<th style="width: 40px;">Name</th>
				<th style="width: 95px;">Route</th>
				<th style="width: 40px;">Fare</th>
				<th style="width: 40px;">Individual Discount</th>
				<th style="width: 40px;">Payment Amount</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($order['passenger_data'] as $k => $v):?>
			<?php if ($order['itinerary_type'] == 'round'):?>
			<tr <?php if ($k % 2 == 0):?>class="info"<?php endif;?>>
				<td rowspan="2"><?php echo $v['passenger_name'];?></td>
				<td>Departure</td>
				<td><?php echo number_format($v['route'][0]['fare']);?></td>
				<td><?php echo $v['individual_discount'];?>%</td>
				<td><?php echo number_format($v['route'][0]['payment_amount']);?></td>
			</tr>
			<tr <?php if ($k % 2 == 0):?>class="info"<?php endif;?>>
				<td>Return</td>
				<td><?php echo number_format($v['route'][0]['fare']);?></td>
				<td><?php echo $v['individual_discount'];?>%</td>
				<td><?php echo number_format($v['route'][0]['payment_amount']);?></td>
			</tr>
			<?php else:?>
			<tr <?php if ($k % 2 == 0):?>class="info"<?php endif;?>>
				<td><?php echo $v['passenger_name'];?></td>
				<td>Departure</td>
				<td><?php echo number_format($v['route'][0]['fare']);?></td>
				<td><?php echo $v['individual_discount'];?>%</td>
				<td><?php echo number_format($v['route'][0]['payment_amount']);?></td>
			</tr>
			<?php endif;?>
			<?php endforeach;?>
			<tr>
				<td colspan="5"><strong>Total: KRW <?php echo number_format($order['total_payment_amount']);?></strong></td>
			</tr>
		</tbody>
	</table>
	<button class="btn btn-mini btn-success" type="button" id="confirm_order_pay_now">Confirm Order and Pay Now</button>
</div>